package com.kfc.sales;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class KFCSalesActivity extends Activity {
    /** Called when the activity is first created. */
	
	//Buttons
	Button login;
	Button cancel;
	EditText username;
	EditText password;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        login = (Button) findViewById(R.id.login);
        cancel = (Button) findViewById(R.id.cancel);
        username = (EditText) findViewById(R.id.username);
        password = (EditText) findViewById(R.id.password);
        
        login.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Login(username.getText().toString(),password.getText().toString(),v);
			}
		});
        
        cancel.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				username.setText("");
				password.setText("");
			}
		});
        
    }
    
    public void Login(String username, String password, View v){
    	Intent i=new Intent(v.getContext(),MainMenu.class);
    	startActivity(i);
    }
}